#pragma once
#include "Pascal.h"
#include "comparators.h"
#include "handletables.h"
#include "hooks.h"
#include "wc3main.h"
#include "wc3jassvm.h"
#include "wc3jassvm.h"
#include "jassvm_extension.h"
#include "logging.h"
#include "stringbuilderhack.h"

procedure debug_logger_OnInit();
void debug_logger_main();

procedure __stdcall OnNativeCall(PInstance Instance, Dword hName);
procedure __stdcall OnCall(PInstance Instance, Dword hName);
procedure __stdcall OnReturn(PInstance Instance);

typedef Pointer* TJumpTable[42];
typedef TJumpTable* PJumpTable;
typedef Boolean* TFunctionTable;
typedef TPointerComparator<TFunctionTable> TFunctionTableComparator;
typedef THandleTableM<TFunctionTable, TFunctionTableComparator> TFunctionTables;

typedef PScriptData* PPScriptData;

const String DEFAULT_LOG_FILE_PATH = "./jass_logger.log";
const String DEFAULT_BLACKLIST_PATH = "./jass_logger.blacklist";


	typedef TScriptHandle (__stdcall *orig_Compile_1) (Dword ErrorCallbackParam, Dword RiskLevel); // fastcall

static const String LogFilePath = DEFAULT_LOG_FILE_PATH;